<template>
    <div>
        {{ name }} -- {{ age }} -- {{ count }}
        <Child />
    </div>
</template>

<script>
import Child from './component';

export default {
    components: {
        Child,
    },
    data () {
        return {
            name: 'zs',
            age: 18,
            count: 0,
        };
    },
    provide () {
        return {
            root: this,
        };
    },
    methods: {
        addCount (val) {
            this.count += val;
        },
    },
};
</script>

<style>

</style>
